<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>百度贴吧--全中国最大的中文社区</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <script src="js/jquery.js"></script>
    <script src="file/bootstrap.min.js"></script>
    <script src="js/jquery.form.js"></script>
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <!--<img alt="140x140" style="width: 100%;height: 100px" src="./file/default.jpg" />-->
                    <!--<pre style="background-color:white;border: none">          <span style="font-size: xx-large">人生只有 <span style="font-size: 60px;color: #fc2923">走出来的美丽</span></span></pre>-->
                    <!--<pre style="background-color:white;border: none">-->
                    <!--<span style="font-size: xx-large">没有等出来的辉煌!</span> </pre>-->

                    <br>
                </div>
            </div>
            <div class="carousel slide" id="carousel-299472">
                <ol class="carousel-indicators">
                    <li data-slide-to="0" data-target="#carousel-299472">
                    </li>
                    <li data-slide-to="1" data-target="#carousel-299472" class="active">
                    </li>
                    <li data-slide-to="2" data-target="#carousel-299472">
                    </li>
                </ol>
                <div class="carousel-inner">
                    <div class="item">
                        <img alt="" style="width: 1600px;height: 500px"
                             src="/img/wow.jpg"/>
                        <div class="carousel-caption">
                            <h4>
                                詹姆斯赛后表示:"我们为了收视正在打假球."
                            </h4>
                            <p>
                                Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta
                                gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
                            </p>
                        </div>
                    </div>
                    <div class="item active">
                        <img alt="" style="width: 1600px;height: 500px"
                             src="/img/nba.jpeg"/>
                        <div class="carousel-caption">
                            <h4>
                                Second Thumbnail label
                            </h4>
                            <p>
                                Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta
                                gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
                            </p>
                        </div>
                    </div>
                    <div class="item">
                        <img alt="" style="width: 1600px;height: 500px"
                             src="http://www.xinhuanet.com/politics/leaders/2018-06/06/1122948080_15282894399911n.jpg"/>
                        <div class="carousel-caption">
                            <h4>
                                习近平同吉尔吉斯斯坦总统热恩别科夫举行会谈
                            </h4>
                            <p>
                                6月6日，国家主席习近平在北京人民大会堂同吉尔吉斯斯坦总统热恩别科夫举行会谈。 新华社记者 李学仁 摄
                            </p>
                        </div>
                    </div>
                </div>
                <a class="left carousel-control" href="#carousel-299472" data-slide="prev"><span
                        class="glyphicon glyphicon-chevron-left"></span></a> <a class="right carousel-control"
                                                                                href="#carousel-299472"
                                                                                data-slide="next"><span
                    class="glyphicon glyphicon-chevron-right"></span></a>
            </div>
        </div>
    </div>


    <div class="row clearfix">
        <div class="col-md-4 column">
            <div id="viewDiv" style="height: 250px">
                <br>
                <!--<form class="form-horizontal" role="form" action="/user/login" onsubmit="return valid_submit">-->
                <!--<form class="form-horizontal" role="form" action="/user/login" id="form_login">-->
                <form class="form-horizontal" role="form" id="form_login">
                    <div class="form-group">
                        <div class="col-sm-10">
                            <input type="text" name="name" class="form-control" id="inputEmail3" placeholder="账号:"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-10">
                            <input type="password" name="password" class="form-control" id="inputPassword3"
                                   placeholder="密码:"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <div class="checkbox">
                                <label><input type="checkbox"/>记住我!</label>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <input type="button" class="btn btn-default" onclick="login_btn();" value="登录">
                            <input type="button" id="btn_register" class="btn btn-default" value="注册">
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="col-md-8 column">
            <br>

            <span class="glyphicon glyphicon-fire" style="color: red;font-size: x-large" aria-hidden="true">热帖</span>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">

                        <a href="/a/main.html">为什么詹姆斯等NBA球员为何都反感库里？</a>
                    </h3>
                </div>
                <div class="panel-body">
                    <a href="">保罗要求5年顶薪，不接受降薪，大家怎么看？</a>
                </div>
                <div class="panel-footer">
                    <a href="">老詹望了望队友，扎心了</a>
                </div>
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    Example page header
                    <small>Subtext for header</small>
                </h1>
            </div>
        </div>
    </div>
</div>


<script>
    $(document).ready(function () {
        $('#btn_register').click(function () {
            $('#viewDiv').load('register.html')
        })

    })

    function login_btn() {
        $('#form_login').ajaxSubmit({
            type: "post",
            url: "/user/login",
            success: function (data) {
                if (data) {
                    //登录成功
                    alert("登录成功")

                    window.location.href = "a/main.html";

                     // window.history.forward("/WEB-INF/jsps/main.html");
                } else {
                    //登录失败
                    alert('登录失败')
                }
            }
        })
    }


</script>


</body>
</html>